﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace Bricks.MiuiThemeMaker.MiuiThemeMaker
{
    /*********************************************************
     * 1.版权：积木工场 Bricks Factory
     * 2.作用：元素窗体
     * 3.创建人：罗泽新
     * 4.创建日期：2012-06-28
     * 5.最后修改人：罗泽新
     * 6.最后修改日期：2012-06-28
     * 7.修改项目：
     * *******************************************************/
    public partial class AboutWin : Window
    {
        public AboutWin()
        {
            InitializeComponent();
            GetProjectInfo();
            btnOK.Focus();  //获取焦点，按空格键可触发
        }

        /// <summary>
        /// 获取工程信息
        /// </summary>
        private void GetProjectInfo()
        {
            this.Title = String.Format("关于 {0} ", AssemblyInfo.Instance.AssemblyTitle);
            this.tbProductName.Text = AssemblyInfo.Instance.AssemblyProduct;
            this.tbVersion.Text = String.Format("软件版本： V{0}", AssemblyInfo.Instance.AssemblyVersion);
            this.tbCopyright.Text = AssemblyInfo.Instance.AssemblyCopyright;
            this.tbCompanyName.Text = AssemblyInfo.Instance.AssemblyCompany;
            this.tbDescription.Text = AssemblyInfo.Instance.AssemblyDescription;
        }

        private void Grid_MouseLeftButtonDown(object sender, MouseButtonEventArgs e)
        {
            this.DragMove();
        }

        private void btnOK_Click(object sender, RoutedEventArgs e)
        {
            this.Close();
        }
    }
}
